package com.cloudbroker.bcs.platform.ltb.bizapi.constants.status;

/**
 * Created by zhaosh19213 on 2016/7/21.
 */
public enum  CommentStatus {
    DEFAULT(1, "默认"),

    ;

    private final int val;

    private final String description;

    private String toString;

    private CommentStatus(int val, String description) {
        this.val = val;
        this.description = description;
    }

    public int getVal() {
        return val;
    }

    public String getDescription() {
        return description;
    }

    public static String getDescription(int realVal) {
        for (CommentStatus s : CommentStatus.values()) {
            if (s.getVal() == realVal) {
                return s.getDescription();
            }
        }
        return String.valueOf(realVal);
    }

    @Override
    public String toString() {
        if (null == toString) {
            toString = new StringBuilder().append("ClientStatus[").append(val).append(':').append(description)
                    .append(']').toString();
        }
        return toString;
    }
}
